﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _007_事件
{
    public delegate void MyDelegate();
    class Program
    {
        public event MyDelegate mydelgate;
        static void Main(string[] args)
        {
            Program p = new Program();
            p.mydelgate = Test1;
            p.mydelgate();
            Console.ReadKey();
        }

        private static void Test1()
        {
            Console.WriteLine("Test");
        }
    }
}
